<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Emp</title>
<link rel="stylesheet" href="layui/css/layui.css" media="all">
</head>
<body>
	<div class="layui-container">
	<div class="layui-input-block layui-col-xs3 layui-col-md5" style="float:right;">
	<form action="es?op=queryByPage" method="post">
	 <input type="text" name="key" placeholder="请输入关键字" value="${key }" style="width:200px;display:inline;" autocomplete="off" class="layui-input">
       <button class="layui-btn" lay-submit lay-filter="formDemo">搜索</button>
	</form>
     
    </div>
		<div class="layui-col-xs6 layui-col-md12">
			<table class="layui-table" lay-skin="line">
				<colgroup>
					<col width="150">
					<col width="150">
					<col width="200">
					<col>
				</colgroup>
				<thead>
					<tr>
						<th>EMPNO</th>
						<th>ENAME</th>
						<th>JOB</th>
						<th>MGR</th>
						<th>HIREDATE</th>
						<th>SAL</th>
						<th>COMM</th>
						<th>DEPTNO</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${pd.data }" var="e">
						<tr>
							<td>${e.EMPNO }</td>
							<td>${e.ENAME }</td>
							<td>${e.JOB }</td>
							<td>${e.MGR }</td>
							<td>${e.HIREDATE }</td>
							<td>${e.SAL }</td>
							<td>${e.COMM}</td>
							<td>${e.DEPTNO}</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
			<div id="page" style="text-align: center;"></div>
		</div>
	</div>
</body>
<script src="layui/layui.js" charset="utf-8"></script>
<script>
layui.use(['laypage', 'layer'], function(){
	  var laypage = layui.laypage
	  ,layer = layui.layer;
	  
	  laypage.render({
		  elem: 'page'
		  ,count: ${pd.total}
		  ,limit:${pd.pageSize}
		  ,limits:[3,5,10,15]
		  ,curr:${pd.page}
		  ,layout: ['count', 'prev', 'page', 'next', 'limit', 'refresh', 'skip']
		  ,jump: function(obj,first){
		  	if(!first){
		  		location.href="es?op=queryByPage&page="+obj.curr+"&pageSize="+obj.limit+"&key=${key }";
		  	}
		  }
		  });
	  
	});
</script>
</html>